Fix rcu domain locking for transitive grants
authorKeir Fraser <keir@xen.org>
Tue, 8 Mar 2011 16:30:30 +0000 (16:30 +0000)
committerKeir Fraser <keir@xen.org>
Tue, 8 Mar 2011 16:30:30 +0000 (16:30 +0000)
commitf544bf377ee829e1342abd818ac30478c6f3a134
treeb640746961aa9452786c09c5f0555d7e8710291b
parent076eae8bef9fcbc18b7541a56b3d897ea16b3865
Fix rcu domain locking for transitive grants

When acquiring a transitive grant for copy then the owning domain
needs to be locked down as well as the granting domain. This was being
done, but the unlocking was not. The acquire code now stores the
struct domain * of the owning domain (rather than the domid) in the
active entry in the granting domain. The release code then does the
unlock on the owning domain.  Note that I believe I also fixed a bug
where, for non-transitive grants the active entry contained a
reference to the acquiring domain rather than the granting
domain. From my reading of the code this would stop the release code
for transitive grants from terminating its recursion correctly.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
xen/common/grant_table.c
xen/include/xen/grant_table.h